

export const showLoading = function (Vue) {
  // window.onload = () => {
  // const root = document.querySelector(".container-box");
  const root = document.body;
  if (root.querySelector(".loading-Box_wxh")) {
    root.removeChild(root.querySelector(".loading-Box_wxh"));
  }
  var loadingBox = document.createElement("div");
  loadingBox.setAttribute("class", "loading-Box_wxh loading-animation");
  loadingBox.setAttribute("style","width:100px;height:100px;min-height:100px;z-index:9999;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;");

  var bounce1 = document.createElement("div");
  bounce1.setAttribute("class", "bounce1");
  var bounce2 = document.createElement("div");
  bounce2.setAttribute("class", "bounce2");
  var bounce3 = document.createElement("div");
  bounce3.setAttribute("class", "bounce3");
  loadingBox.appendChild(bounce1);
  loadingBox.appendChild(bounce2);
  loadingBox.appendChild(bounce3);
  root.appendChild(loadingBox);

};

export const hideLoading = function () {
  // const root = document.querySelector(".container-box");
  const root = document.body;
  if (root.querySelector(".loading-Box_wxh")) {
    root.removeChild(root.querySelector(".loading-Box_wxh"));
  }
};


